package pers.vicxu.mvcrestplus.dao;


import pers.vicxu.mvcrestplus.pojo.Book;

import java.util.List;

/**
 * Create by Vic Xu on 7/26/2018
 *
 * @author Vic Xu
 */
public interface BookDao {

    /**
     * 查询所有
     *
     * @return
     */
    public List<Book> findAll();

    /**
     * 添加成功返回id
     *
     * @param book
     * @return
     */
    public Book addBook(Book book);

    /**
     * 删除
     *
     * @param key
     * @return
     */
    public boolean deleteBook(String key);

    /**
     * @param book
     * @return
     */
    public Book updateBook(Book book);

}
